import React, {FC} from "react";
import {NavLink, Outlet} from "react-router-dom";
const ipcRender = window.ipcRenderer
const Layout:FC = () => {
    const win_max=()=>{
        ipcRender.send("win_max")
    }
    const win_min=()=>{
        ipcRender.send("win_min")
    }
    const win_close=()=>{
        ipcRender.send("win_close")
    }
  return(
      <>
          <header className='h-14 bg-[#ccc877ff] flex items-center justify-between px-10'>
              <div className='flex space-x-5 h-full items-center'>
                  <NavLink to="home">首页</NavLink>
                  <NavLink to="tools">工具</NavLink>
                  <NavLink to="workspace">最近发现</NavLink>
                  <NavLink to="manage">账号管理</NavLink>
              </div>
              <div className='flex space-x-5 items-start h-full pt-2'>
                  <span className='iconfont icon-xiaoxi'></span>
                  <span className='iconfont icon-pifu'></span>
                  <span className='iconfont icon-shezhi'></span>
                  <span className='iconfont icon-dingzhu'></span>
                  <span className='iconfont icon-2zuixiaohua-2' onClick={win_min}></span>
                  <span className='iconfont icon-quanpingzuidahua' onClick={win_max}></span>
                  <span className='iconfont icon-guanbi' onClick={win_close}></span>
              </div>
          </header>
          <Outlet></Outlet>
      </>
  )
}
export default Layout
